﻿using System;
using WindowsGame.Input;

namespace WindowsGame.Manager
{
	/// <summary>
	/// InputManager delegates all work to InputFactory.
	/// </summary>
	public interface IInputManager
	{
		Single Rotate();
		Single Move();
		Boolean Warp();
	}

	public class InputManager : IInputManager
	{
		// InputManager has dependency on InputFactory.
		private readonly AInputFactory inputFactory;

		public InputManager(AInputFactory inputFactory)
		{
			this.inputFactory = inputFactory;
		}

		public Single Rotate()
		{
			return inputFactory.Rotate();
		}

		public Single Move()
		{
			return inputFactory.Move();
		}

		public Boolean Warp()
		{
			return inputFactory.Warp();
		}
	}
}